package com.mc.design.proxy.staticx;

public class StudyProxy implements IStudy {

	private IStudy study;

	public IStudy getProxy(IStudy study){
		this.study=study;
		return this;
	}
	
	@Override
	public void readBook() {
		openBook();
		// 调用最基础的实现类。
		study.readBook();
		closeBook();
	}
	
	@Override
	public void test(){
		study.test();
	}

	private void openBook() {
		System.out.println("翻开书");
	}

	private void closeBook() {
		System.out.println("关闭术");
	}


}
